frappe.ui.form.on('User', {
	refresh(frm) {
		// your code here
		
	if (!frappe.user.has_role('System Manager')) { 
        frm.set_df_property("document_follow_notifications_section", "hidden", 1)
        frm.set_df_property("email_settings", "hidden", 1)
		frm.set_df_property("third_party_authentication", "hidden", 1)
		frm.set_df_property("connections_tab", "hidden", 1)	
		$(".menu-btn-group").hide();
		$(".inner-group-button").hide();
		$("#user-connections_tab-tab").hide()
		$("#user-short_bio-tab").hide()


		frm.set_df_property("default_workspace", "hidden", 1)	
		frm.set_df_property("desk_settings_section", "hidden", 1)
		frm.set_df_property("mute_sounds", "hidden", 1)
		frm.set_df_property("desk_theme", "hidden", 1)
		frm.set_df_property("banner_image", "hidden", 1)
		frm.set_df_property("language", "hidden", 1)
		frm.set_df_property("time_zone", "hidden", 1)
		frm.set_df_property("short_bio", "hidden", 1)
        }

	}
})